<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8" />
  <title>联盟排行榜</title>
  <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0' />
  <link rel="stylesheet" href="css/rank.css" />
  <script type="text/javascript" src="js/jquery.min.js"></script>
  <script type="text/javascript" src="js/adapter.js"></script>
  <script type="text/javascript" src="js/moduls/alliance.js" ></script>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>

</head>

<body>
  <div class="content">
    <div class="logo">
      <img src="img/logo.png" />
    </div>
    <div class="theme">
      <img src="img/theme.png" />
    </div>
    <div class="subTop">
      <div class="picture">
        <img src="img/title2.png" />
      </div>

    </div>

    <div class="middlePath">
      <div class="title">
        <img src="img/rank.png" alt="">
      </div>
      <div class="line">
        <img src="img/line.png" alt="">
      </div>
      <div class="midContent">
        <div class="myRanking">

          <span>我的联盟排名： </span><span class="place">{{myRank}}名</span>
        </div>

      </div>
      <div class="tableContent">
        <div class="innerTab">
          <table style="border-collapse:collapse">
            <thead>
              <tr>
                <td style="width: 1.2rem;">排名</td>
                <td style="width: 1.9rem;">省区/大区/全国</td>
                <td style="width: 1.9rem;">荣誉值</td>
              </tr>
            </thead>
            
          </table>
        </div>
        <div class="innerTab2">
        	<table style="border-collapse:collapse">
        		<tbody>
              <tr v-for="(rank,index) in ranks" :key="index">
                <td style="width: 1.2rem;">NO.{{index+1}}</td>
                <td style="width: 1.9rem;">{{rank.address}}</td>
                <td style="width: 1.9rem;">{{rank.honor}}</td>

              </tr>
            </tbody>
        	</table>
        </div>
      </div>
      <div class="page">
        <!--<span>页码</span>
        <span>1</span>
        <span>2</span>
        <span>3</span>
        <span>4</span>
        <span>5</span>
        <span>6</span>-->
      </div>
      <div class="line">
        <img src="img/line.png" alt="">

      </div>
    </div>

    <div class="backBtn"><a href="javascript:history.go(-1)">返回</a></div>
    <div class="bottom-logo">
      <img src="img/bottom_logo2.png" />
    </div>
  </div>

  <script>

    var app = new Vue({
      el: '.content',
      data: {
      	myRank:'',
        ranks: []
      }
    })
    
    //获取排行榜
    getTeamsRank("chomoo_test_001",function(_res){
    	if(_res.code!=0){
    		alert("还没有加入联盟")
    		return;
    	}else{
//  		for (var i = 0; i < _res.team.length%10; i++) {
//  		var t_team = {"honor":"","address":""}
//  		_res.team.push(t_team)
//  	}
    	app.ranks = _res.team;
    	app.myRank=_res.myTeamRank;
    	}

    	
    })
    
  </script>

</body>

</html>